package com.moneywelcome.antifraudfacade.api;

import com.moneywelcome.antifraudfacade.form.IdcardForm;
import com.moneywelcome.antifraudfacade.form.ModifyIdcardForm;
import com.moneywelcome.antifraudfacade.info.IdcardInfo;
import com.moneywelcome.results.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

//@Api(tags = "实名身份证接口")
@FeignClient(value = "anti-fraud",contextId = "UserIdcardApi")
public interface UserIdcardApi {

    @ApiOperation("身份证数据录入")
    @PostMapping("idcard")
    Result saveIdcard(@RequestBody IdcardForm form);

    @ApiOperation("根据用户id查询身份证")
    @GetMapping("idcard/{userId}")
    Result<IdcardInfo> getIdcard(@PathVariable("userId")Integer userId);

    @ApiOperation("修改身份证信息")
    @PutMapping("idcard")
    Result modifyIdcard(@RequestBody IdcardForm form);


}
